package com.nengchuan.eic.nceconomy.constant;

import java.util.stream.Stream;

/**
 * 功能描述:
 *
 * @Author: liurui
 * @Date: 2020/4/23 0023 下午 6:51
 */
public enum CategoryEnum {

    CAN_RESEARCH_ESTIMATE("可研估算","CAN_RESEARCH_ESTIMATE"),
    BUDGET_ESTIMATE("初设概算","BUDGET_ESTIMATE"),
    BUDGET("施工图预算","BUDGET"),
    SETTLE("结算","SETTLE"),
    INVENTORY("施工费招标限价","INVENTORY"),
    NULL("","");

    public String text;
    public String code;

    CategoryEnum(String text,String code) {
        this.text = text;
        this.code = code;
    }

    public static String getTextByCode(String code){
       return Stream.of(CategoryEnum.values()).filter(x->x.code.equals(code)).findFirst().orElse(NULL).text;
    }

}
